home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
BARNET
/
COMPILER
/
SATHER
/
!Sather
/
Library
/
Containrs
/
sa
/
container
< prev
next >
Wrap
Text File
|
1996-07-16
|
1KB
|
35 lines
---------------------------> Sather 1.1 source file <--------------------------
-- container_alg.sa: Operations that work by inclusion on any container
-- Author: Benedict A. Gomes <gomes@tiramisu.ICSI.Berkeley.EDU>
-- Copyright (C) 1995, International Computer Science Institute
-- $Id: container.sa,v 1.3 1996/07/16 04:38:12 holger Exp $
--
-- COPYRIGHT NOTICE: This code is provided WITHOUT ANY WARRANTY
-- and is subject to the terms of the SATHER LIBRARY GENERAL PUBLIC
-- LICENSE contained in the file: Sather/Doc/License of the
-- Sather distribution. The license is also available from ICSI,
-- 1947 Center St., Suite 600, Berkeley CA 94704, USA.
-------------------------------------------------------------------
abstract class $CONTAINER{ETP} < $ELT{ETP} is
-- The basic abstract container type
-- Does not have a create:SAME method, since this does not make sense
-- for arrays and other indexible types, where the create should
-- take SAME as an argument
-- Inherits: elt!, str
copy: SAME;
-- Return a copy of the current container
-- post result = self
size: INT;
-- Number of elements actually inserted
has(e: ETP): BOOL;
-- pre ~void(self)
-- True if the container contains the element "e"
end;
-------------------------------------------------------------------